<?php

if (isset($_POST['submitEdit'])) {

    $year = $_POST['ootmYear'];
    $month = $_POST['ootmMonth'];
    $name = $_POST['ootmName'];
    $desc = $_POST['ootmDesc'];
    $id = $_POST['ootmID'];

    include 'DBLibrary/config.php';
    include 'DBLibrary/openDB.php';

    mysql_select_db("rotaract");

        $result = mysql_query("UPDATE `rotaract`.`ootm` SET `month`= '$month', `year`= '$year', `name`= '$name', `desc`='$desc' WHERE `ootm`.`id`= $id") or die(mysql_error());

    $confirm = 'Update successful!';
}
?>
